#include<stdio.h>
#include<math.h>//运费计算公式：运费=单价X路程X重量X折扣
int main()
{
    int km;
    float count,price,money,weight;
    int d;
    printf("please enter price,weight and km!!!\n");
    printf("-------------------------------------------\n");
    scanf("%f,%f,%d",&price,&weight,&km);
    if(km>=3000)
    {
        count=0.15;
    }
    else d=km/250;
    switch (d)
    {
    case 0: count=0;break;
    case 1: count=0.02;break;
    case 2: count=0.05;break;
    case 3: 
    case 4: count=0.08;break;
    case 5:
    case 6:
    case 7:
    case 8: count=0.1;break;
    case 9:
    case 10:
    case 11:
    case 12:count=0.1;break;
    }
    money=(1-count)*km*price*weight;
    printf("The money is %1.2f\n",money);
}